What is the proper way to create a cross-fade effect? [closed]

Posted by Starx on Programmers See other posts from Programmers or by Starx
Published on 2012-10-11T06:30:54Z Indexed on 2012/10/12 9:50 UTC
Read the original article Hit count: 219

Filed under:
|
|

When creating an image slider, using a cross fade is one of more popular effects. Various sliders use differing techniques to create such an effect. Two techniques I've found so far are:

  • Use an overlay and underlay <div> and fade in and out each other's visibility.
  • Create a <div> matching the exact size of the slider during initialization, play with its z-index property, and then fade each other.

Is there a better way to create this effect?

© Programmers or respective owner

Related posts about web-development

Related posts about JavaScript